import request from '@/utils/request'

// 查询反向生成字段映射列表
export function listReverseGenTableColumnMap(data) {
  return request({
    url: '/generator/ReverseGenTableColumnMap/list',
    method: 'post',
    data: data ? data : {}
  })
}

// 通过ID组查询反向生成字段映射列表
export function listReverseGenTableColumnMapByIds(mapId, pageParams) {
  return request({
    url: '/generator/ReverseGenTableColumnMap/listByIds/' + mapId,
    method: 'get',
    params: pageParams
  })
}

// 查询反向生成字段映射详细
export function getReverseGenTableColumnMap(mapId) {
  return request({
    url: '/generator/ReverseGenTableColumnMap/' + mapId,
    method: 'get'
  })
}

// 新增反向生成字段映射
export function addReverseGenTableColumnMap(data) {
  return request({
    url: '/generator/ReverseGenTableColumnMap',
    method: 'post',
    data: data
  })
}

// 批量新增反向生成字段映射
export function addReverseGenTableColumnMaps(data) {
  return request({
    url: '/generator/ReverseGenTableColumnMap/addReverseGenTableColumnMaps',
    method: 'post',
    data: data
  })
}

// 修改反向生成字段映射
export function updateReverseGenTableColumnMap(data) {
  return request({
    url: '/generator/ReverseGenTableColumnMap',
    method: 'put',
    data: data
  })
}

// 批量修改反向生成字段映射
export function updateReverseGenTableColumnMaps(data) {
  return request({
    url: '/generator/ReverseGenTableColumnMap/editReverseGenTableColumnMaps',
    method: 'put',
    data: data
  })
}

// 删除反向生成字段映射
export function delReverseGenTableColumnMap(mapId) {
  return request({
    url: '/generator/ReverseGenTableColumnMap/' + mapId,
    method: 'delete'
  })
}

// 导出反向生成字段映射
export function exportReverseGenTableColumnMap(query) {
  return request({
    url: '/generator/ReverseGenTableColumnMap/export',
    method: 'get',
    params: query
  })
}

// 导出反向生成字段映射（包含样式）
export function exportReverseGenTableColumnMapWithStyle(data) {
  return request({
    url: '/generator/ReverseGenTableColumnMap/exportWithStyle',
    method: 'post',
    data: data
  })
}
